/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.jdProduct.service;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.jdProduct.dao.ProductPoolDao;
import com.jeesite.modules.jdProduct.entity.ProductPool;


/**
 * 测试数据Service
 * 
 * @author ThinkGem
 * @version 2018-04-22
 */
@Service
@Transactional(readOnly = true)
public class ProductPoolService extends
		CrudService<ProductPoolDao, ProductPool> {



	/**
	 * 获取单条数据
	 * 
	 * @param testData
	 * @return
	 */
	@Override
	public ProductPool get(ProductPool productPool) {
		ProductPool entity = super.get(productPool);
		if (entity == null) {
			entity = new ProductPool();
		}
		return entity;
	}
	public ProductPool getByPageNum(ProductPool productPool) {
		
		return dao.getByPageNum(productPool);
	}
	
	/**
	 * 查询分页数据
	 * 
	 * @param page
	 *            分页对象
	 * @param testData
	 * @return
	 */
	@Override
	public Page<ProductPool> findPage(Page<ProductPool> page,
			ProductPool productPool) {
		return super.findPage(page, productPool);
	}

	/**
	 * 保存数据（插入或更新）
	 * 
	 * @param testData
	 */
	@Override
	@Transactional(readOnly = false)
	public void save(ProductPool productPool) {
		super.save(productPool);
		
	}

	/**
	 * 更新状态
	 * 
	 * @param testData
	 */
	@Override
	@Transactional(readOnly = false)
	public void updateStatus(ProductPool productPool) {
		super.updateStatus(productPool);
	}

	/**
	 * 删除数据
	 * 
	 * @param testData
	 */
	@Override
	@Transactional(readOnly = false)
	public void delete(ProductPool productPool) {
		super.delete(productPool);
	}

}